package com.updesignsz.admin.service;

import com.updesignsz.admin.mapper.BannerMapper;
import com.updesignsz.commom.entity.Banner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 横幅图片
 * Creation date 2020-8-8 15:02:24
 */
@Service
public class BannerService{

	@Autowired
	private BannerMapper bannerMapper;


	public void deleteBanner(Integer id) {
		bannerMapper.deleteBanner(id);
	}

	public List<Map<String, Object>> listAll(Banner type) {
		return bannerMapper.listAll(type);
	}

	public void saveBanner(Banner form) {
		bannerMapper.saveBanner(form);
	}

	public void updateBanner(Banner form) {
		bannerMapper.updateBanner(form);
	}

	public Banner getById(Integer id) {
		return bannerMapper.getById(id);
	}


}